package com.sq.partner.manager.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sq.partner.manager.dao.ITradInsuPlanGroupDao;
import com.sq.partner.manager.mybatis.model.TradInsuPlanGroup;
import com.sq.partner.manager.service.ITradInsuPlanGroupService;

@Service
public class TradInsuPlanGroupServiceImpl implements ITradInsuPlanGroupService {

	@Resource
	ITradInsuPlanGroupDao groupdao;
	
	@Override
	public boolean addTradInsuPlanGroup(TradInsuPlanGroup group)
			throws Exception {
		return groupdao.addTradInsuPlanGroup(group);
	}

	@Override
	public boolean updateTradInsuPlanGroup(TradInsuPlanGroup group)
			throws Exception {
		return groupdao.updateTradInsuPlanGroup(group);
	}

	@Override
	public boolean deleteTradInsuPlanGroup(TradInsuPlanGroup group)
			throws Exception {
		return groupdao.deleteTradInsuPlanGroup(group);
	}

	@Override
	public List<TradInsuPlanGroup> queryTradInsuPlanGroup(
			TradInsuPlanGroup group) throws Exception {
		return groupdao.queryTradInsuPlanGroup(group);
	}

	@Override
	public boolean deleteTradInsuPlanGroup(String insuPlanNumber)
			throws Exception {
		return groupdao.deleteTradInsuPlanGroup(insuPlanNumber);
	}

	@Override
	public boolean updateIsRequired(TradInsuPlanGroup group) throws Exception {
		return groupdao.updateIsRequired(group);
	}

	@Override
	public void deleteTradInsuPlanGroupByInsuPlanNo(String insuPlanNo)
			throws Exception {
		 groupdao.delete("delTradInsuPlanGroupByInsuPlanNo", insuPlanNo);
		
	}
	
	@Override
	public void deleteTradNocarPlanGroupByPlanCode(String prodCode)
			throws Exception {
		 groupdao.delete("deleteTradNocarPlanGroupByPlanCode", prodCode);
		
	}

	@Override
	public void deleteTradInsuPlanGroupByGroupId(long groupId) throws Exception {
		groupdao.delete("delTradInsuPlanGroupByGropuId", groupId);
		
	}

	@Override
	public List<TradInsuPlanGroup> impNlifeGroup(Map<String, Object> map)
			throws Exception {
		return groupdao.impNlifeGroup(map);
	}

	@Override
	public List<TradInsuPlanGroup> searchTradInsuPlanGroupsByplanCode(
			Map<String, Object> maps) throws Exception {
		// TODO Auto-generated method stub
		return groupdao.searchTradInsuPlanGroupsByplanCode(maps);
	}

	@Override
	public void addPlanGroupList(List<TradInsuPlanGroup> group)
			throws Exception {
		// TODO Auto-generated method stub
		groupdao.addPlanGroupList(group);
	}

	@Override
	public List<Map<String, Object>>  impNlifeGroup1(Map<String, Object> map)
			throws Exception {
		// TODO Auto-generated method stub
		return groupdao.impNlifeGroup1(map);
	}
	
	@Override
	public List<Map<String, Object>> impRealGroupPlan(Map<String, Object> map)
			throws Exception {
		return groupdao.impRealGroupPlan(map);
	}

}
